.class final Lcom/greystripe/sdk/aw;
.super Ljava/lang/Object;

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field final synthetic a:Ljava/lang/String;

.field final synthetic b:Lcom/greystripe/sdk/at;


# direct methods
.method constructor <init>(Lcom/greystripe/sdk/at;Ljava/lang/String;)V
    .locals 0

    iput-object p1, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    iput-object p2, p0, Lcom/greystripe/sdk/aw;->a:Ljava/lang/String;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final run()V
    .locals 5

    const/4 v4, -0x1

    iget-object v0, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    invoke-static {v0}, Lcom/greystripe/sdk/at;->a(Lcom/greystripe/sdk/at;)Landroid/widget/FrameLayout;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/FrameLayout;->removeAllViews()V

    iget-object v0, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    iget-object v0, v0, Lcom/greystripe/sdk/at;->a:Lcom/greystripe/sdk/y;

    iget-object v1, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    invoke-virtual {v0, v1}, Lcom/greystripe/sdk/y;->setOnErrorListener(Landroid/media/MediaPlayer$OnErrorListener;)V

    iget-object v0, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    invoke-static {v0}, Lcom/greystripe/sdk/at;->a(Lcom/greystripe/sdk/at;)Landroid/widget/FrameLayout;

    move-result-object v0

    iget-object v1, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    iget-object v1, v1, Lcom/greystripe/sdk/at;->a:Lcom/greystripe/sdk/y;

    new-instance v2, Landroid/widget/FrameLayout$LayoutParams;

    const/16 v3, 0x11

    invoke-direct {v2, v4, v4, v3}, Landroid/widget/FrameLayout$LayoutParams;-><init>(III)V

    invoke-virtual {v0, v1, v2}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    invoke-static {v0}, Lcom/greystripe/sdk/at;->b(Lcom/greystripe/sdk/at;)V

    new-instance v0, Landroid/widget/MediaController;

    iget-object v1, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    invoke-static {v1}, Lcom/greystripe/sdk/at;->c(Lcom/greystripe/sdk/at;)Landroid/app/Activity;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/widget/MediaController;-><init>(Landroid/content/Context;)V

    iget-object v1, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    iget-object v1, v1, Lcom/greystripe/sdk/at;->a:Lcom/greystripe/sdk/y;

    invoke-virtual {v1, v0}, Lcom/greystripe/sdk/y;->setMediaController(Landroid/widget/MediaController;)V

    iget-object v0, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    iget-object v0, v0, Lcom/greystripe/sdk/at;->a:Lcom/greystripe/sdk/y;

    iget-object v1, p0, Lcom/greystripe/sdk/aw;->a:Ljava/lang/String;

    invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/greystripe/sdk/y;->setVideoURI(Landroid/net/Uri;)V

    invoke-static {}, Lcom/greystripe/sdk/bd;->b()Z

    move-result v0

    if-eqz v0, :cond_0

    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "videoView: getCurrentTime:"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    invoke-virtual {v1}, Lcom/greystripe/sdk/at;->getCurrentTime()D

    move-result-wide v1

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " canPause:"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    invoke-virtual {v1}, Lcom/greystripe/sdk/at;->canPause()Z

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " canSeekBackward:"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    invoke-virtual {v1}, Lcom/greystripe/sdk/at;->canSeekBackward()Z

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " canSeekForward:"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    invoke-virtual {v1}, Lcom/greystripe/sdk/at;->canSeekForward()Z

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " getBufferPercentage:"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    invoke-virtual {v1}, Lcom/greystripe/sdk/at;->getBufferPercentage()I

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " isPlaying:"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    invoke-virtual {v1}, Lcom/greystripe/sdk/at;->isPlaying()Z

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " getDuration:"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    invoke-virtual {v1}, Lcom/greystripe/sdk/at;->getDuration()D

    move-result-wide v1

    invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/Object;

    invoke-static {v0, v1}, Lcom/greystripe/sdk/bd;->b(Ljava/lang/String;[Ljava/lang/Object;)V

    :cond_0
    iget-object v0, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    iget-object v0, v0, Lcom/greystripe/sdk/at;->a:Lcom/greystripe/sdk/y;

    invoke-virtual {v0}, Lcom/greystripe/sdk/y;->requestFocus()Z

    iget-object v0, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    iget-object v0, v0, Lcom/greystripe/sdk/at;->a:Lcom/greystripe/sdk/y;

    invoke-virtual {v0}, Lcom/greystripe/sdk/y;->start()V

    iget-object v0, p0, Lcom/greystripe/sdk/aw;->b:Lcom/greystripe/sdk/at;

    invoke-static {v0}, Lcom/greystripe/sdk/at;->d(Lcom/greystripe/sdk/at;)Z

    return-void
.end method
